<?php
$this->breadcrumbs = array(
    'Quản lý menu' => array('index'),
    'Tạo menu',
);
?><div class="page-header position-relative">
    <h1>Tạo menu</h1>
</div><!--/.page-header-->
<?php echo $this->renderPartial('_form', array('model' => $model)); ?>
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery('#menu').change(function(){
            $.ajax({
                url : 'submenu',
                type: 'get',
                dataType: 'json',
                data: {'id':jQuery('#menu').val()},
                success: function(data){
                    var html = '<option value="">--</option>';
                    $.each(data,function(i){
                        html += '<option value="'+i+'">'+data[i]+'</option>';   
                    });
                    jQuery('#submenu').html(html);
                }
            });
        });
    });
</script>